package com.zxy;

public class demo04 {
    public static void main(String[] args) {
        String a = "张三李四王五abc";
        System.out.println(a.startsWith("张"));
        System.out.println(a.startsWith("三"));
        System.out.println(a.endsWith("abc"));
        System.out.println(a.contains("abc"));

        String b = "sfsdjvnfoshcjvkdghsiggdhc";
        int bb = b.indexOf("c");
        System.out.println(bb);
        int bbb = b.lastIndexOf("c");
        System.out.println(bbb);
    }
}
